! existing link
if tagexists is true
  ! label number
  ifNDef #hrecNum
    #hrecNum="H"
  else if #hrecNum="H"
    #hrecNum=0
  else
    #hrecNum+=1
  endif
  
  ! static text with level and tab
  NewLine
  cell static,local(@tag)&" ("&#hrecNum&"):"
  sizetofit
  set tabwidth -1 alignment right font "GEDCOM Extension Text"

  cell LinkButton
  if @contents is validlink
    TextExpression @contents.view
    AppendedExpression view
    set border no Font "Hyperlink Text"
    sizetofit
    RecordLink @contents
    Help local("Click to open home individual record")
  else
    Text "Click to detach invalid link"
    #msg="_HME"&return&@contents&return&local("Detach invalid home record link")
    set ScriptLink "DeleteOneTag.gcscpt" ScriptType "format" ScriptMessage #msg
    set border shadowlesssquare
    sizetofit
  endif
endif
